const HtmlWebpackPlugin = require('html-webpack-plugin'); // 通过 npm 安装
const webpack = require('webpack'); // 用于访问内置插件

module.exports = {
    // 只识别  .js  .json
    entry: "./src/index",
    output: {
        path: __dirname + '/dist',
        filename: "main.js"
    },
    // mode: "development",
    devServer: {
        port: 3000,
        open: true
    },
    mode: "development",
    plugins: [new HtmlWebpackPlugin({ template: './public/index.html' })],
    // .css  .vue   .jsx
}